<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>5-1vue-router基本使用</title>
</head>
<body>
<div id="app">
  <router-link to="/login" tag="span">log in</router-link>
  <router-view></router-view>
</div>
</body>
<script src="./js/vue.js"></script>
<script src="./js/vue-router.js"></script>
<script>
  let vr=new VueRouter({
    routes:[
      {
        path:"/login",
        component:{
          template:"<h1>login page</h1>"
        }
      }
    ]
  })
  new Vue({
    el:"#app",
    router: vr
  })
</script>
</html>